<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core">
	<head><title>IGNORED</title></head>
    <body>
		<ui:composition template="../templates/layout.xhtml">
			<ui:define name="windowTitle">Daily Market | Administrator Console | Manage Categories</ui:define>
			<ui:define name="logoImage"><h:graphicImage library="images" name="logo_header.jpg" alt="logo" /></ui:define>
			<ui:define name="navigation"></ui:define>
			<ui:define name="content">
				<div id="content" class="graphic_bg">
					<h:form>
						<div class="form-row header">New Category</div>
						<div class="form-row">
							<h:outputLabel for="new_cat_name" styleClass="form-row">Name:</h:outputLabel>
							<h:inputText id="new_cat_name" value="#{catListBean.newCatName}" required="true" requiredMessage="#{msgs.field_required}" />
						</div>
						<div class="form-row">
							<h:outputLabel for="new_cat_desc" styleClass="form-row">Description:</h:outputLabel>
							<h:inputTextarea id="new_cat_desc" value="#{catListBean.newCatDesc}" style="width: 240px; height: 75px; vertical-align: top;" />
						</div>
						<div class="form-row">
							<h:outputLabel for="new_cat_parent" styleClass="form-row">Parent:</h:outputLabel>
							<h:selectOneMenu id="new_cat_parent" value="#{catListBean.newCatParent}">
								<f:selectItem itemValue="0" itemLabel="--== None ==--" />
								<f:selectItems value="#{catListBean.allCategories}" var="category" itemValue="#{category.ID}" itemLabel="#{category.name}" />
							</h:selectOneMenu>
						</div>
						<div class="form-row submit">
							<h:commandLink action="#{catListBean.doSaveNewCategory}" styleClass="image-button">Save</h:commandLink>
							<h:link outcome="manage_categories" styleClass="image-button">Cancel</h:link>
						</div>
					</h:form>
				</div>
			</ui:define>
		</ui:composition>
    </body>
</html>
